#pragma once
#include <functional>
#include <string>

//typedef  void (__stdcall* Recv_CB_T)(std::string &message);
 using Recv_CB_T = std::function<void(std::string&,LPVOID)>;

class IWinHttpWebSocket
{
public:
	virtual bool Init() = 0;
	virtual bool CrackUrl() = 0;
	virtual bool Open() = 0;
	virtual void Close() = 0;
	virtual void Release() = 0;
	virtual bool AddHeader(std::wstring strHeader) = 0;
	virtual bool Send(std::wstring strMessage) = 0;
};

IWinHttpWebSocket* __stdcall GetWebSocket(std::wstring strUrl, Recv_CB_T cb, LPVOID lpContext);